/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.data.feature;

import chunmap.model.elem.Envelope;
import chunmap.model.geom.Geometry;
/**
 * @author chunquedong
 * 
 */
public class ShapeFeature extends AbstractFeature implements Shape{

	public Geometry getGeometry() {
		return geometry;
	}
	public void setGeometry(Geometry geometry) {
		this.geometry = geometry;
	}
	
	public Object[] getValues() {
		return values;
	}
	public void setValues(Object[] values) {
		this.values = values;
	}
	//------------------------------------------------------------------------

	private Geometry geometry;
	private Object[] values;
    
    public Envelope getEnvelop()
    {
        return geometry.getEnvelop();
    }

    //------------------------------------------------------------------------

	@Override
	public Object getVaule(int index) {
		return values[index];
	}
	@Override
	public void setVaule(int index, Object value) {
		values[index]=value;
	}
	
	@Override
	public String toString(){
		return FeatureUtil.Feature2String(this);
	}
}